<script>
export default {
  globalData: {
    bottomLift: 0, // 适配iphoneX底部黑线
    statusBarHeight: 0,
    windowWidth: 750,
    isNewUser: true, // 是否为新用户
    getSafeHeight: function () {
      uni.getSystemInfo({
        success: (res) => {
          console.log("获取设备信息：", res);
          // 获取底部的安全高度
          this.bottomLift = res.screenHeight - res.safeArea.bottom;
          // 获取顶部状态栏高度
          this.statusBarHeight = res.statusBarHeight;
          // 屏幕宽度
          this.windowWidth = res.windowWidth;
          console.log("底部距离安全高度为", this.bottomLift, "px");
        },
      });
    },
  },
  onLaunch: function () {
    this.globalData.getSafeHeight();
    console.log("App Launch");
  },
  onShow: function () {
    console.log("App Show");
  },
  onHide: function () {
    console.log("App Hide");
  },
};
</script>

<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
/*每个页面公共css */
page {
  margin-top: 80rpx;
  // height: 100%;
  width: 100%;
  .uni-tabbar {
    /deep/ .uni-tabbar-item-icon {
      font-size: 50rpx; /* 设置图标大小为 24rpx */
    }
  }
  // padding: 50rpx;
  // background-color: #101113;
}
</style>
